<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>发表帖子</title>
	<meta http-equiv="Access-Control-Allow-Origin" content="*">
	<!-- 强制让文档的宽度与设备的宽度保持1:1，并且文档最大的宽度比例是1.0，且不允许用户点击屏幕放大浏览 -->
	<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width, minimal-ui">
	<!-- iphone设备中的safari私有meta标签，它表示：允许全屏模式浏览 -->
	<meta name="apple-mobile-web-app-capable" content="yes"> 
    <link href="../css/mui.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../css/cw.css"/>
	<link rel="stylesheet" href="../css/style.css"> 
	<style>
		/*.mui-bar{position: relative;}
		.body-content{position: relative;}*/
	</style>
</head>
<body>
	<header id="header" class="mui-bar mui-bar-nav">
		<span class="mui-action-back mui-icon mui-icon-left-nav " ></span>
		<h1 class="mui-title color-white font-18 yj">发表帖子</h1>
	</header>
	<div class="mui-content"> 
		<div class="Fith">
			<div class="mui-table-view" style="border-bottom: 1px solid #ccc;">
				<div class="mui-table-view-cell">
					<span class="title-tips">悬赏</span> 
					<input class="adopt" type="number" id="adopt" name="adopt" value="0" style="display: inline-block !important;width: 18%; margin: 0;text-align: center; color: orange;border: 1px solid #CCCCCC;vertical-align: middle;">
					<span>积分</span>
				</div>
			</div> 
			<div class="publish-article-title">
				<div class="title-tips">标题</div>
				<input type="text" id="title" name="title" class="w100" placeholder="文章标题">
			</div> 
			<div class="publish-article-content">
				<div class="title-tips">正文</div>
				<input type="hidden" id="target">
				<div class="article-content content" id="content">
				</div>
				<div class="footer-btn g-image-upload-box">
					<div class="upload-button">
						<span class="upload"><i class="upload-img"></i>插入图片</span>
						<input class="input-file" id="imageUpload" type="file" name="fileInput" capture="camera" accept="image/*" style="position:absolute;left:0;opacity:0;width:100%;">
					</div>
				</div>
			</div>
			<div class="table-view-cell">
				<button class="mui-btn mui-btn-block background-zx color-white search-btn tj feedback">提交</button>
			</div>
		</div>	
	</div>
	<script src="../js/jquery-2.1.4.min.js"></script>
	<script src="../js/artEditor.min.js"></script>
	<script type="text/javascript" src="../js/app/add-post.js" ></script> 
	<script type="text/javascript" src="../js/mui.js" ></script>
	<script type="text/javascript" src="../js/mui.min.js" ></script>
	<script type="text/javascript" src="../js/public.js" ></script>
	<script>
		$(function() {
			"use strict";
			$('#content').artEditor({
				imgTar: '#imageUpload',
				limitSize: 5,   // 兆
				showServer: false,
				uploadUrl: '',
				data: {},
				uploadField: 'image',
				placeholader: '<p>请输入文章正文内容</p>',
				validHtml: ["<br/>"],
				formInputId: 'target',
				uploadSuccess: function(res) {
					// return img url
					return res.path;
				},
				uploadError: function(res) {
					// something error
					console.log(res);
				}
			});
		});
	</script>
</body>
</html>
